<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserDakaTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //用户打卡
        Schema::create('user_daka', function(Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->timestamp('daka_time')->nullable()->comment('打卡时间');
            $table->decimal('fiber_num')->default(0)->comment('今日摄入的纤维量');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
